<template>
	<view>
		<staff-detail @submit="handleSubmit"></staff-detail>
	</view>
</template>

<script>
	import staffDetail from './components/detail.vue'

	export default {
		components: { staffDetail },
		onLoad() {
			// 注册一个通信接口
			this.eventChannel = this.getOpenerEventChannel()
			this.$wxSdkUtil.init(null, { hideShare: true })
		},
		methods: {
			// 监听提交事件 与上一个页面通信
			handleSubmit(postForm) {
				this.eventChannel.emit('submit', { postForm, msg: '新增了！！！' })
			}
		}
	}
</script>
